#include "bsp_iwdg.h"


void iwdg_init(void) 
{	
    /* confiure FWDGT counter clock: 40KHz(IRC40K) / 64 = 0.625 KHz */
    fwdgt_config(2*1000,FWDGT_PSC_DIV64);
    
    /* After 1.6 seconds to generate a reset */
    fwdgt_enable();
}

void iwdg_feed(void)
{
    fwdgt_write_enable();

    fwdgt_counter_reload();
}
